<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<block name="title"><title>心心向善-商城</title></block>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta name="keywords" content="心心向善-商城">
		<meta name="description" content="心心向善-商城">
		<!--<link rel="shortcut icon" href="http://www.rate.net/favicon.ico">-->
		
		<block name="style2">
			<link href="__PUBLIC__/Home/css/base.css" rel="stylesheet" type="text/css">	
		</block>		
		<block name="style">
			<link href="__PUBLIC__/Home/css/home_header.css" rel="stylesheet" type="text/css">			
		</block>	
	
		<link href="__PUBLIC__/Home/css/font-awesome.min.css" rel="stylesheet">
		<script src="__PUBLIC__/Home/js/jquery.js"></script>		
		<script src="__PUBLIC__/Home/js/jquery.ui.js"></script>
		<script src="__PUBLIC__/Home/js/jquery.validation.min.js"></script>
		<script src="__PUBLIC__/Home/js/jquery.masonry.js"></script>
		<script type="text/javascript" src="__PUBLIC__/Home/js/common.js"></script>
		<!--<script src="__PUBLIC__/Home/js/dialog.js" id="dialog_js" charset="utf-8"></script><link href="__PUBLIC__/Home/css/dialog.css" rel="stylesheet" type="text/css">-->
		<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.lazyload.js"></script>
		<block name="script2">
		<script>
			var COOKIE_PRE = 'CC64_';
			var _CHARSET = 'utf-8';
			var SITEURL = window.location.host+'/shop';
			var SHOP_SITE_URL = window.location.host+'/shop';
			//			var RESOURCE_SITE_URL = 'http://www.rate.net/data/resource';
			//			var RESOURCE_SITE_URL = 'http://www.rate.net/data/resource';
			//			var SHOP_TEMPLATES_URL = 'http://www.rate.net/shop/templates/default';
		</script>			
		</block>


		<script type="text/javascript">
			var PRICE_FORMAT = '&yen;%s';
			$(function() {
				//首页左侧分类菜单
				$(".category ul.menu").find("li").each(
					function() {
						$(this).hover(
							function() {
								var cat_id = $(this).attr("cat_id");
								var menu = $(this).find("div[cat_menu_id='" + cat_id + "']");
								menu.show();
								$(this).addClass("hover");
								var menu_height = menu.height();
								if(menu_height < 60) menu.height(80);
								menu_height = menu.height();
								var li_top = $(this).position().top;
								$(menu).css("top", -li_top + 38);
							},
							function() {
								$(this).removeClass("hover");
								var cat_id = $(this).attr("cat_id");
								$(this).find("div[cat_menu_id='" + cat_id + "']").hide();
							}
						);
					}
				);
				$(".head-user-menu dl").hover(function() {
						$(this).addClass("hover");
					},
					function() {
						$(this).removeClass("hover");
					});
				//				$('.head-user-menu .my-mall').mouseover(function() { // 最近浏览的商品
				//					load_history_information();
				//					$(this).unbind('mouseover');
				//				});
				//				$('.head-user-menu .my-cart').mouseover(function() { // 运行加载购物车
				//					load_cart_information();
				//					$(this).unbind('mouseover');
				//				});
				//				$('#button').click(function() {
				//					if($('#keyword').val() == '') {
				//						return false;
				//					}
				//				});
				$("img[rel='lazy']").lazyload({
					threshold: 200,
					failure_limit: 10,
					skip_invisible: false,
					effect: "fadeIn"
				});
			});
		</script>

	</head>

	<body>
		<!-- PublicTopLayout Begin -->

		<div id="append_parent"></div>
		<div id="ajaxwaitid"></div>
		<div id="vToolbar" class="nc-appbar">
			<div class="nc-appbar-tabs" id="appBarTabs">
				<div class="user ta_delay" nctype="a-barUserInfo">
					<div class="avatar"><if condition="$UserInfo.userpic neq ''" ><img src="{$UserInfo.userpic}"><else/><img src="__PUBLIC__/Home/images/default_user_portrait.gif"></if></div>
					<p>我</p>
				</div>
				<div class="user-info" nctype="barUserInfo" style="display:none;"><i class="arrow"></i>
					<div class="avatar"><if condition="$UserInfo.userpic neq ''" ><img src="{$UserInfo.userpic}"><else/><img src="__PUBLIC__/Home/images/default_user_portrait.gif"></if>
						<div class="frame"></div>
					</div>
					<dl>
						<dt><if condition="$username neq ''">Hi, {$username}<else/>Hi, 您好！</if></dt>
						<dd>当前等级：<strong nctype="barMemberGrade">V0</strong></dd>
						<dd>当前经验值：<strong nctype="barMemberExp">0</strong></dd>
					</dl>
				</div>
				<ul class="tools">
					<li>
						<a href="javascript:void(0);" id="chat_show_user" class="chat ta_delay">
							<div class="tools_img"></div><span>聊天</span><i id="new_msg" class="new_msg" style="display:none;"></i></a>
					</li>
					<li>
						<a href="javascript:void(0);" id="rtoolbar_cart" class="cart ta_delay">
							<div class="tools_img"></div><span>购物车</span><i id="rtoobar_cart_count" class="new_msg" style="display:none;"></i></a>
					</li>
					<li>
						<a href="javascript:void(0);" id="compare" class="compare ta_delay">
							<div class="tools_img"></div><span>对比</span></a>
					</li>
					<li>
						<a href="javascript:void(0);" id="gotop" class="gotop ta_delay">
							<div class="tools_img"></div><span>顶部</span></a>
					</li>
				</ul>
				<div class="content-box" id="content-compare">
					<div class="top">
						<h3>商品对比</h3>
						<a href="javascript:void(0);" class="close" title="隐藏"></a>
					</div>
					<div id="comparelist"></div>
				</div>
				<div class="content-box" id="content-cart">
					<div class="top">
						<h3>我的购物车</h3>
						<a href="javascript:void(0);" class="close" title="隐藏"></a>
					</div>
					<div id="rtoolbar_cartlist">
					</div>
				</div>
				<a id="activator" href="javascript:void(0);" class="nc-appbar-hide"></a>
			</div>
			<div class="nc-hidebar" id="ncHideBar">
				<div class="nc-hidebar-bg">
					<div class="user-avatar"><img src="__PUBLIC__/Home/images/default_user_portrait.gif"></div>
					<div class="frame"></div>
					<div class="show"></div>
				</div>
			</div>
		</div>

		<div class="public-top-layout w">
			<div class="topbar wrapper">
  
				<div class="user-entry">
					<if condition="$username neq ''">
					您好 <span>
					<a href="/member">{$username}</a>
					<div class="nc-grade-mini" style="cursor:pointer;">V0</div>
					</span> 欢迎回来，
					
					<a href="/" title="首页" alt="首页"><span>{$UserInfo.realname}</span></a> <span>[<a href="/out.html">退出</a>] </span>
					<else/>
						Hi，欢迎来 <a href="/" title="首页" alt="首页">心心向善商城</a>
						<a href="/login.html">请登录</a> <span><a href="/reguser.html">免费注册</a></span>					
					</if>
				</div>
				
				<div class="quick-menu">

<!-- 					<dl class="down_app">
						<dt><a href="#">手机移动端</a><i></i></dt>
						<dd>
							<div class="qrcode"><img src="__PUBLIC__/Home/images/mb_app.png"></div>
							<div class="hint">
								<h4>扫描二维码</h4> 下载手机客户端
							</div>
							<div class="addurl">
								<a href="#" target="_blank">Android</a>
								<a href="#" target="_blank">iPhone</a>
							</div>
						</dd>
					</dl> -->
					<dl class="wr">
					
						<dt><a href="#" title="商家管理">商家管理</a><i></i></dt>
						<dd>
							<ul>
								<li>
									<a href="/store_joinin" title="招商入驻">招商入驻</a>
								</li>
								<li>
									<a href="/store/index" target="_blank" title="登录商家管理中心">商家中心</a>
								</li>
							</ul>
						</dd>

					</dl>
					<dl>
						<dt><a href="/member">我的商城</a><i></i></dt>
						<dd>
							<ul>
								<li>
									<a href="/member/swjydd.html">待付款订单</a>
								</li>
								<li>
									<a href="/member/swjydd.html">待确认收货</a>
								</li>
								<li>
									<a href="/member/swjydd.html">待评价交易</a>
								</li>
							</ul>
						</dd>
					</dl>
					<dl>
						<dt><a href="/member/wdsp.html">我的收藏</a><i></i></dt>
						<dd>
							<ul>
								<li>
									<a href="/member/wdsp.html">商品收藏</a>
								</li>
								<li>
									<a href="/member/wddp.html">店铺收藏</a>
								</li>
							</ul>
						</dd>
					</dl>
<!-- 
					<dl class="weixin">
						<dt>关注我们<i></i></dt>
						<dd>
							<h4>扫描二维码<br>
								关注商城微信号</h4>
							<img src="__PUBLIC__/Home/images/04781087584534013.png"> </dd>
					</dl> -->
				</div>
			</div>
		</div>
		<script type="text/javascript">
			var sss = '{$cart_goods_num}' ;
			if (sss) {				
				$('#rtoobar_cart_count').html(sss).show() ;
			}
			
			/*点击回到顶部*/
			$('#gotop').click(function() {
				$('html, body').animate({
					scrollTop: 0
				}, 500);
			});

			//动画显示边条内容区域
			$(function() {
				$(function() {
					$('#activator').click(function() {
						$('#content-cart').animate({
							'right': '-250px'
						});
						$('#content-compare').animate({
							'right': '-250px'
						});
						$('#vToolbar').animate({
								'right': '-60px'
							}, 300,
							function() {
								$('#ncHideBar').animate({
									'right': '59px'
								}, 300);
							});
						$('div[nctype^="bar"]').hide();
					});
					$('#ncHideBar').click(function() {
						$('#ncHideBar').animate({
								'right': '-86px'
							},
							300,
							function() {
								$('#content-cart').animate({
									'right': '-250px'
								});
								$('#content-compare').animate({
									'right': '-250px'
								});
								$('#vToolbar').animate({
									'right': '6px'
								}, 300);
							});
					});
				});
				$("#compare").click(function() {
					if($("#content-compare").css('right') == '-250px') {
						loadCompare(false);
						$('#content-cart').animate({
							'right': '-250px'
						});
						$("#content-compare").animate({
							right: '0px'
						});
					} else {
						$(".close").click();
						$(".chat-list").css("display", 'none');
					}
				});
				$("#rtoolbar_cart").click(function() {
					if($("#content-cart").css('right') == '-250px') {
						$('#content-compare').animate({
							'right': '-250px'
						});
						$("#content-cart").animate({
							right: '0px'
						});
						var vals = $("#rtoolbar_cartlist").html() ;
						
						if(vals==''){						
							alert(vals);
						} else {
						
							$("#rtoolbar_cartlist").load('http://'+SHOP_SITE_URL+'/cart.html?act=cart&op=ajax_load&type=html');
						}
					} else {
						$(".close").click();
						$(".chat-list").css("display", 'none');
					}
				});
				$(".close").click(function() {
					$(".content-box").animate({
						right: '-250px'
					});
				});

				$(".quick-menu dl").hover(function() {
						$(this).addClass("hover");
					},
					function() {
						$(this).removeClass("hover");
					});

				// 右侧bar用户信息
				$('div[nctype="a-barUserInfo"]').click(function() {
					$('div[nctype="barUserInfo"]').toggle();
				});
				// 右侧bar登录
				//				$('div[nctype="a-barLoginBox"]').click(function() {
				//					$('div[nctype="barLoginBox"]').toggle();
				//					document.getElementById('codeimage').src = 'http://www.rate.net/shop/index.php?act=seccode&op=makecode&nchash=b7f807b0&t=' + Math.random();
				//				});
				//				$('a[nctype="close-barLoginBox"]').click(function() {
				//					$('div[nctype="barLoginBox"]').toggle();
				//				});
			});
		</script>